#ifndef DW_GRAPHICS_OPENGL_PROGRAM_H
# define DW_GRAPHICS_OPENGL_PROGRAM_H

#include "graphics/program.h"

namespace dw
{
	namespace graphics
	{
		namespace opengl
		{

			class Program : public dw::graphics::Program
			{
			// Constructors
			public:

				Program();

				Program(const std::string& vertexShader, const std::string& fragmentShader);
				
				~Program();

			// Methods
			public:

				void attachShader(dw::graphics::Shader* shader);

				void detachShader(dw::graphics::Shader* shader);



				void link();

				void build();



				GLhandleARB getGLId() const { return _glId; }

			// Typedefs
			public:

				typedef std::set< dw::graphics::Shader* >	ShaderSet;

				typedef ShaderSet::iterator ShaderIterator;
			
			// Fields
			private:

				ShaderSet _shaders;

				GLhandleARB _glId;

			};

		} // namespace opengl
	} // namespace graphics
} // namespace dw

#endif // DW_GRAPHICS_OPENGL_PROGRAM_H
